//error actions

#ifndef _CHATTER_ERR_LOG_H
#define _CHATTER_ERR_LOG_H

#include	<stdio.h>
#include	<stdlib.h>
#include 	<string.h>
#include	<errno.h>		/* for definition of errno */
#include	<stdarg.h>		/* ANSI C header file */


/*********************************************
 * log format:
 * type		
 * 
 * EXAMPLES:							
 * [--]Fri May 1 19:31:32 UTC 2009		NOMARL		ID:12345678	login
 * [WW]Fri May 1 19:31:32 UTC 2009		SYSTEM		too many links
 * [EE]Fri May 1 19:31:32 UTC 2009		SYSTEM		unrecogized argument:
 * [--]Fri May 1 19:31:32 UTC 2009		SYSTEM		start
 */


#define LOG___	2		/* regular record ([--]) */
#define LOG_WW	4		/* warn	record	([WW]) */
#define	LOG_EE	8		/* error record ([EE])	*/

#define LOG_NOMARL	0			/* NOMARL TYPE */
#define LOG_SYS		128			/* SYSTEM TYPE */

/*** user interface  */

void write_log(const char logtype, const char *, ...);

void err_msg(const char *, ...);

void err_exit(const char *, ...);

#endif /* _CHATTER_ERR_LOG_H*/
